import request from '@/utils/request'

// 封装获取文章类别的API方法
export const getCategoryAPI = () => request.get('/my/cate/list')

// 添加分类
export const addCategoryAPI = data => request.post('/my/cate/add', data)

// 删除分类
export const delCategoryAPI = id => request.delete('/my/cate/del', { params: { id } })

// 修改分类
export const infoCategoryAPI = data => request.put('/my/cate/info', data)

// 添加文章
export const addArticleAPI = data => request.post('/my/article/add', data)

// 获取文章列表数据
// 调用方法的时候，会传递请求参数过来{}
export const getArticleAPI = data => request.get('/my/article/list', { params: data })
